package com.huowenjie.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Ri2Controller {

    @RequestMapping("test02/{name}")
    public String test(@PathVariable String name){
        if("1".equals(name)){
            throw new RuntimeException("==小笨蛋！出错了哦~==");
        }
        System.out.println("==实例被访问了哦！==");
        return name;
    }

}
